Skip to content

Conversation

@argha-c
Copy link

@argha-c argha-c commented Jul 14, 2023

Multi-threading on the server list refresher makes assumptions about the lb state management that may not necessarily be true. Especially for LB extensions, these assumptions aren't enforceable through the interfaces provided.

Generally a single thread on the JVM dedicated for pushing these updates should work for most cases, and mitigates concurrency issues seen recently, on some apps.
The props exist for individual apps to override this, when necessary.

In terms of validation, this change was validated in our Zuul deployment through long running canaries that didn't show any regression.

int corePoolSize = getCorePoolSize();
defaultServerListUpdateExecutor.setCorePoolSize(corePoolSize);
defaultServerListUpdateExecutor.setMaximumPoolSize(corePoolSize * 5);
defaultServerListUpdateExecutor.setCorePoolSize(getCorePoolSize());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, in JDK9, they added more error checking when you call setCorePoolSize, so if you attempt to resize higher than the maximum pool size, it'll error out. We found this within Hystrix as well : Netflix/Hystrix#1874 (comment)

Generally, you can just flip them, but then the inverse is true if you try to resize the max lower. Not sure if we need to accommodate that, but something to be aware of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants